package com.hsu.example.consumer;

import com.hsu.example.common.model.User;
import com.hsu.example.common.service.UserService;
import com.hsu.hsurpc.proxy.ServiceProxyFactory;

/**
 * 服务消费者启动类
 * @Author Hsu琛君珩
 * @Date 2024-09-17 1:20
 * @Description
 * @Version: v1.0.0
 */
public class EasyConsumerExample {

    public static void main(String[] args) {
        // 使用动态代理
        UserService userService = ServiceProxyFactory.getProxy(UserService.class);
        // 调用服务
        User user = new User();
        user.setName("hsurosy");
        User result = userService.getUser(user);
        System.out.println(result.getName());
    }
}
